<html>
<head><meta charset="utf-8"><title>ambiguous answer replacement · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html">ambiguous answer replacement</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="184865130"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184865130" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184865130">(Jan 05 2020 at 21:11)</a>:</h4>
<p>So, let's talk about <a href="https://github.com/rust-lang/chalk/issues/302" target="_blank" title="https://github.com/rust-lang/chalk/issues/302">https://github.com/rust-lang/chalk/issues/302</a></p>



<a name="184865133"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184865133" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184865133">(Jan 05 2020 at 21:11)</a>:</h4>
<p>Been thinking about this, and the "correct" way to solve it</p>



<a name="184865267"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184865267" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184865267">(Jan 05 2020 at 21:14)</a>:</h4>
<p>So, before, we set the existing subst to not ambiguous when we encounter a new non-ambiguous subst. But showed in the issue, this <em>could</em> have caused a panic (or maybe bad logic) because the way it was handled, we assumed elsewhere that that was a "new" answer</p>



<a name="184865308"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184865308" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184865308">(Jan 05 2020 at 21:15)</a>:</h4>
<p>But thinking about this, having an ambiguous answer for a table means that strands that depend on that table could also be ambiguous</p>



<a name="184865361"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184865361" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184865361">(Jan 05 2020 at 21:16)</a>:</h4>
<p>and if the original answer is no longer ambiguous, then those dependent strands don't need to be ambiguous either</p>



<a name="184865372"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184865372" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184865372">(Jan 05 2020 at 21:17)</a>:</h4>
<p>now, its obvious (since the new panic didn't cause any tests to fail), that this case isn't tested</p>



<a name="184865376"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184865376" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184865376">(Jan 05 2020 at 21:17)</a>:</h4>
<p>so it's mostly theoretical</p>



<a name="184865431"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184865431" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184865431">(Jan 05 2020 at 21:18)</a>:</h4>
<p>but I had an interesting idea, that I'm not sure if it can work</p>



<a name="184865434"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184865434" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184865434">(Jan 05 2020 at 21:18)</a>:</h4>
<p>but, what if instead of "ambiguous", we stored that ambiguity as a delayed subgoals?</p>



<a name="184865493"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184865493" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184865493">(Jan 05 2020 at 21:20)</a>:</h4>
<p>So, right now there are two cases where an strand can be ambiguous (without depending on an ambiguous strand): <code>CannotProve</code> and truncation</p>



<a name="184865520"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184865520" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184865520">(Jan 05 2020 at 21:22)</a>:</h4>
<p>there is one more that is slightly different, which is one when the root table flounders, the aggregator uses an ambiguous identity subst</p>



<a name="184865641"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184865641" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184865641">(Jan 05 2020 at 21:24)</a>:</h4>
<p>but that also matters for whether an answer is <code>Unique</code> or not</p>



<a name="184865746"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184865746" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184865746">(Jan 05 2020 at 21:26)</a>:</h4>
<p>(now that I'm thinking about it, I'm wondering if storing truncation as a delayed subgoal could also have fixed <a href="https://github.com/rust-lang/chalk/issues/280" target="_blank" title="https://github.com/rust-lang/chalk/issues/280">https://github.com/rust-lang/chalk/issues/280</a>)</p>



<a name="184865922"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184865922" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184865922">(Jan 05 2020 at 21:30)</a>:</h4>
<p>it's also a bit interesting because the delayed subgoals are similar to the delayed literals</p>



<a name="184865930"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184865930" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184865930">(Jan 05 2020 at 21:31)</a>:</h4>
<p>and that got removed in favor of marking as ambiguous</p>



<a name="184865941"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184865941" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184865941">(Jan 05 2020 at 21:31)</a>:</h4>
<p>and this is somewhat thinking the opposite: all ambiguity is represented as a delayed subgoal</p>



<a name="184940944"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184940944" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184940944">(Jan 06 2020 at 20:05)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> any thoughts about this (don't know if you've put any thought into it)</p>



<a name="184941037"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184941037" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184941037">(Jan 06 2020 at 20:06)</a>:</h4>
<p>one thought I had is that</p>



<a name="184941051"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184941051" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184941051">(Jan 06 2020 at 20:06)</a>:</h4>
<p>when we were discussing coinduction</p>



<a name="184941062"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184941062" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184941062">(Jan 06 2020 at 20:06)</a>:</h4>
<p>I was at some point advocating for including the idea of a "canceled" answer -- or something like that --</p>



<a name="184941069"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184941069" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184941069">(Jan 06 2020 at 20:06)</a>:</h4>
<p>you wound up adding it, but only at the "top level"</p>



<a name="184941083"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184941083" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184941083">(Jan 06 2020 at 20:07)</a>:</h4>
<p>but I think that "canceling" the existing answer and adding a new one seems .. maybe reasonable here</p>



<a name="184941096"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184941096" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184941096">(Jan 06 2020 at 20:07)</a>:</h4>
<p>So, I thought about that</p>



<a name="184941103"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184941103" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184941103">(Jan 06 2020 at 20:07)</a>:</h4>
<p>But I think ultimately that would be <em>wrong</em></p>



<a name="184941122"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184941122" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184941122">(Jan 06 2020 at 20:07)</a>:</h4>
<p>Because there might have been other answers that "depended" on that answer</p>



<a name="184941141"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184941141" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184941141">(Jan 06 2020 at 20:08)</a>:</h4>
<p>(so, they were ambiguous when they could have not been)</p>



<a name="184951544"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184951544" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184951544">(Jan 06 2020 at 20:11)</a>:</h4>
<p>I don't see the problem</p>



<a name="184951560"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184951560" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184951560">(Jan 06 2020 at 20:11)</a>:</h4>
<p>if there was a thread that was pulling from the table</p>



<a name="184951562"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184951562" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184951562">(Jan 06 2020 at 20:11)</a>:</h4>
<p>it will <em>also</em> see the new answer</p>



<a name="184951576"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184951576" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184951576">(Jan 06 2020 at 20:11)</a>:</h4>
<p>and so the dependent answers will eventually be themselves canceled</p>



<a name="184951589"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184951589" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184951589">(Jan 06 2020 at 20:11)</a>:</h4>
<p>(I could see a concern around <em>efficiency</em>, perhaps)</p>



<a name="184951660"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184951660" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184951660">(Jan 06 2020 at 20:12)</a>:</h4>
<p>ah, true</p>



<a name="184951683"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184951683" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184951683">(Jan 06 2020 at 20:12)</a>:</h4>
<p>(that said, I wonder if I should review how some of the existing solvers I was copying from handled this situation)</p>



<a name="184951693"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184951693" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184951693">(Jan 06 2020 at 20:13)</a>:</h4>
<p>the papers are a bit opaque but "mappable" :)</p>



<a name="184951708"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184951708" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184951708">(Jan 06 2020 at 20:13)</a>:</h4>
<p>hmm</p>



<a name="184951969"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184951969" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184951969">(Jan 06 2020 at 20:16)</a>:</h4>
<p>(specifically the "Efficient Top-Down Computation of Queries Under the Well-formed Semantics (Chen, Swift, and Warren; Journal of Logic Programming '95)" paper)</p>



<a name="184952025"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184952025" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184952025">(Jan 06 2020 at 20:16)</a>:</h4>
<p>maybe I should take a look at it</p>



<a name="184952044"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184952044" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184952044">(Jan 06 2020 at 20:17)</a>:</h4>
<p>it's a good paper but it took me many, many reads to understand it</p>



<a name="184952063"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184952063" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184952063">(Jan 06 2020 at 20:17)</a>:</h4>
<p>it's written I think for a narrow set of folks, all of whom have implemented Prolog WAM engines :)</p>



<a name="184952077"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184952077" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184952077">(Jan 06 2020 at 20:17)</a>:</h4>
<p>of course at this point you sort of have :)</p>



<a name="184952187"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184952187" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184952187">(Jan 06 2020 at 20:18)</a>:</h4>
<p>I suppose that's true</p>



<a name="184952403"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184952403" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184952403">(Jan 06 2020 at 20:21)</a>:</h4>
<p>I'll give your idea a try</p>



<a name="184959998"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184959998" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184959998">(Jan 06 2020 at 21:44)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I've implemented this idea to test here: <a href="https://github.com/jackh726/chalk/compare/tests_refactor...jackh726:ambiguous_as_cannotprove" target="_blank" title="https://github.com/jackh726/chalk/compare/tests_refactor...jackh726:ambiguous_as_cannotprove">https://github.com/jackh726/chalk/compare/tests_refactor...jackh726:ambiguous_as_cannotprove</a></p>



<a name="184960006"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184960006" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184960006">(Jan 06 2020 at 21:44)</a>:</h4>
<p>in case you're interested</p>



<a name="184960027"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/184960027" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#184960027">(Jan 06 2020 at 21:44)</a>:</h4>
<p>still going to try to implement your idea before I PR anything</p>



<a name="185052690"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/185052690" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#185052690">(Jan 07 2020 at 20:43)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> you around</p>



<a name="185052798"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/185052798" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#185052798">(Jan 07 2020 at 20:44)</a>:</h4>
<p>Implemented your idea: <a href="https://github.com/jackh726/chalk/compare/tests_refactor...jackh726:invalid_answers" target="_blank" title="https://github.com/jackh726/chalk/compare/tests_refactor...jackh726:invalid_answers">https://github.com/jackh726/chalk/compare/tests_refactor...jackh726:invalid_answers</a></p>



<a name="185052869"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/185052869" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#185052869">(Jan 07 2020 at 20:44)</a>:</h4>
<p>Need to come up with a test that would fail if I didn't check an an answer is invalid, because none of the tests cover that case now</p>



<a name="185062647"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/185062647" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#185062647">(Jan 07 2020 at 22:39)</a>:</h4>
<p>I'm around, but real busy today running from meeting to meeting</p>



<a name="185128903"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/185128903" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#185128903">(Jan 08 2020 at 16:18)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> How should I do this? Should I make two separate PRs to discuss? Just one? Do you want just look at the compare links above for now?</p>



<a name="185148890"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/185148890" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#185148890">(Jan 08 2020 at 19:39)</a>:</h4>
<p>Mm the compare links are probably ok for now, sorry, I might not get to this until Friday though  :(</p>



<a name="185151496"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/185151496" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#185151496">(Jan 08 2020 at 20:07)</a>:</h4>
<p>No problem</p>



<a name="185300193"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/185300193" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#185300193">(Jan 10 2020 at 11:00)</a>:</h4>
<p><span class="user-mention" data-user-id="232957">@Jack Huey</span> if there's some experimental PR we can plug into rust-analyzer, I'll be glad to try it out! I think we know observe these panics pretty regularly :(</p>



<a name="185302669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/185302669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#185302669">(Jan 10 2020 at 11:43)</a>:</h4>
<p>hmm... actually even if this gets fixed, we'll have to decide between the fix and support for <code>impl Trait</code> since that got removed without so far a replacement, AFAIK <span aria-label="oh no" class="emoji emoji-1f615" role="img" title="oh no">:oh_no:</span></p>



<a name="185340064"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/185340064" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#185340064">(Jan 10 2020 at 19:01)</a>:</h4>
<p><span class="user-mention" data-user-id="133169">@matklad</span> there's two different branches right now that both should fix this</p>



<a name="185340086"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/185340086" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#185340086">(Jan 10 2020 at 19:01)</a>:</h4>
<p>Just waiting for <span class="user-mention" data-user-id="116009">@nikomatsakis</span> to take a look</p>



<a name="185340163"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/185340163" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#185340163">(Jan 10 2020 at 19:02)</a>:</h4>
<p><a href="https://github.com/jackh726/chalk/tree/ambiguous_as_cannotprove" target="_blank" title="https://github.com/jackh726/chalk/tree/ambiguous_as_cannotprove">https://github.com/jackh726/chalk/tree/ambiguous_as_cannotprove</a></p>



<a name="185340196"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/185340196" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#185340196">(Jan 10 2020 at 19:02)</a>:</h4>
<p><a href="https://github.com/jackh726/chalk/tree/invalid_answers" target="_blank" title="https://github.com/jackh726/chalk/tree/invalid_answers">https://github.com/jackh726/chalk/tree/invalid_answers</a></p>



<a name="185340321"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/185340321" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#185340321">(Jan 10 2020 at 19:03)</a>:</h4>
<p>I'm also currently working on a way to make it possible to yield before an answer is actually generated</p>



<a name="185340354"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/185340354" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#185340354">(Jan 10 2020 at 19:03)</a>:</h4>
<p>simplest would be to just yield based on time</p>



<a name="185340455"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/ambiguous%20answer%20replacement/near/185340455" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/ambiguous.20answer.20replacement.html#185340455">(Jan 10 2020 at 19:04)</a>:</h4>
<p>but, that would allow to use a larger max size without worrying about taking too long</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>